package com.loyal.mwm.ui;

import android.view.Menu;
import android.view.MenuItem;

import androidx.annotation.NonNull;
import androidx.appcompat.widget.Toolbar;

import com.loyal.mwm.R;
import com.loyal.mwm.base.BaseSwipeActivity;
import com.loyal.mwm.databinding.ActivityFeedbackBinding;
import com.loyal.mwm.handler.FeedBackHandler;
import com.loyal.mwm.util.ImageUtil;

public class FeedBackActivity extends BaseSwipeActivity<ActivityFeedbackBinding> {

    @Override
    public int actLayoutRes() {
        return R.layout.activity_feedback;
    }

    @Override
    public void afterOnCreate() {
        Toolbar toolbar = binding.toolbar.getRoot();
        toolbar.setTitle("问题反馈");
        setSupportActionBar(toolbar);
        binding.setClick(new FeedBackHandler(this, binding));
        binding.setDrawable(ImageUtil.getBackground(this));
    }

    @Override
    public int setEdgePosition() {
        return LEFT;
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.menu_history, menu);
        return true;
    }

    @Override
    public boolean onOptionsItemSelected(@NonNull MenuItem item) {
        if (item.getItemId() == R.id.menu_history) {//startActivityByAct(ListFeedBackActivity.class);
            return true;
        }
        return super.onOptionsItemSelected(item);
    }
}
